package com.du.javaweb.filter; /**
 * @author : DuJiabao
 * @Date : 2021/3/28 19:44
 * @Project : java-web
 * @File : ${FILE_NAME}
 * @Desc :
 */

import javax.servlet.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebFilter(filterName = "Filter1", urlPatterns = "/index.jsp")
public class Filter1 implements Filter {
  public void init(FilterConfig config) throws ServletException {
  }

  public void destroy() {
  }

  @Override
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
    System.out.println("Filter1 开始");
    chain.doFilter(request, response);
    System.out.println("Filter1 结束");
  }
}
